-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[gradle] A flag to disable multimodule resources. #4771
Conversation
@MatkovIvan, please, review as well |
@@ -22,7 +22,7 @@ internal object ComposeProperties { | |||
internal const val MAC_NOTARIZATION_PASSWORD = "compose.desktop.mac.notarization.password" | |||
internal const val MAC_NOTARIZATION_TEAM_ID_PROVIDER = "compose.desktop.mac.notarization.teamID" | |||
internal const val CHECK_JDK_VENDOR = "compose.desktop.packaging.checkJdkVendor" | |||
internal const val ALWAYS_GENERATE_RESOURCE_ACCESSORS = "compose.resources.always.generate.accessors" | |||
internal const val ENABLE_MULTIMODULE_RESOURCES = "compose.resources.multimodule.enable" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it about publication and depending on resource library, or only about publication?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is about a publication and a multimoduleness (very close things in the gradle)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happen if it is false
, and users add a dependency on a library with resources? Will it work without this property?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. It's false by default and all tests are green at least)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, you meant a library with resources (not the resource's library!). No, it requires the flag
Release notes should in this format: Release NotesBreaking changes - Resources
|
gradle-plugins/compose/src/test/test-projects/misc/kmpResourcePublication/gradle.properties
Outdated
Show resolved
Hide resolved
...c/main/kotlin/org/jetbrains/compose/desktop/application/internal/ComposeProjectProperties.kt
Show resolved
Hide resolved
gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/resources/ComposeResources.kt
Outdated
Show resolved
Hide resolved
…ins.compose.resources.multimodule.enable'
… provide a flag to switch on previous behavior
gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/resources/KmpResources.kt
Outdated
Show resolved
Hide resolved
…esources/KmpResources.kt Co-authored-by: Igor Demin <igordmn@users.noreply.github.com>
The Compose Multiplatform Resources with the mulimodule.publication support is a new feature and may have some not found problems. The PR introduces a gradle property to switch back to the previous behavior: `org.jetbrains.compose.resources.multimodule.disable=true` ## Testing After update to Kotlin 2.0.0 and CMP 1.6.10 all projects will be switched to the new logic with the multimodule support. Gradle info output should contain a message: ``` Configure KMP resources ``` If the new feature breaks user's projects they may add `org.jetbrains.compose.resources.multimodule.disable=true` to the `gradle.properties` to disable it. After that Gradle info output will contain: ``` Configure compose resources ``` ## Release Notes ### Resources To disable the Compose Resources publication and the multimodule support in cases of problems add `org.jetbrains.compose.resources.multimodule.disable=true` to the root `gradle.properties`. (cherry picked from commit bf6142d)
The Compose Multiplatform Resources with the mulimodule.publication support is a new feature and may have some not found problems. The PR introduces a gradle property to switch back to the previous behavior:
org.jetbrains.compose.resources.multimodule.disable=true
Testing
After update to Kotlin 2.0.0 and CMP 1.6.10 all projects will be switched to the new logic with the multimodule support.
Gradle info output should contain a message:
If the new feature breaks user's projects they may add
org.jetbrains.compose.resources.multimodule.disable=true
to thegradle.properties
to disable it. After that Gradle info output will contain:Release Notes
Features - Resources
org.jetbrains.compose.resources.multimodule.disable=true
to the rootgradle.properties
.